import math,time

def array(l):
    n1=math.ceil(math.log(l,3))
    n2=math.ceil(math.log2(l/n1))
    n3=math.ceil(l/(n1*n2))
    result=sorted([2**a*3**b*5**c
                    for a in range(n1)
                    for b in range(n2)
                    for c in range(n3)])
    if n1*n2*n3 > l:
        result=result[:l]
    return result

start=time.time()
print(array(100))
print(time.time()-start)
